Boolean entropy decoder and boolean entropy decoding method for video display system

ABSTRACT

A Boolean entropy decoder including a decoding module, a buffer and an updating module is provided. The decoder sequentially generates a first boolean value, a second boolean value and a third boolean value. The first and second boolean values are generated during a same cycle. The decoding module requires a first bit amount while generating a first value corresponding to the first boolean value, and requires a second bit amount while generating a second value corresponding to the second boolean value. The buffer temporarily stores a bit segment in the bitstream to be provided to the decoding module. The updating module fetches a new bit segment according to the first bit amount and the second bit amount and updates the buffer. The decoding module selectively updates a value corresponding to the third boolean value after the buffer is updated.

This application claims the benefit of Taiwan application Serial No. 100135360, filed Sep. 29, 2011, the subject matter of which is incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention relates in general to an image processing technique, and more particularly, to a technique for reducing a decoding time and optimizing an image processing efficiency.

2. Description of the Related Art

Persistently expanding sizes of image displays is one of the development trends of a current multimedia display system, and so it is necessary that an operating speed of an image processing apparatus be correspondingly increased. Taking a High-Definition Television (HDTV) monitor as an example, a decoding device in the HDTV monitor needs to process at least 60 1920*1080 frames per second. Therefore, solutions for reducing a cycle and enhancing a decoding efficiency of a decoding device are now much sought for.

A Boolean entropy decoder prevalently implemented as a decoder in an image processing system is for converting a bitstream to a boolean value corresponding to image data. FIG. 1 shows a block diagram of a stereotypic Boolean decoder. In the structure shown, a decoder 100 sequentially generates two boolean values within every cycle T. When generating a boolean value B₀, a split S₀ corresponding to the boolean value B₀ is first calculated according to an equation below:

$\begin{matrix} {S_{0} = {1 + \frac{\left( {R - 1} \right)*P_{0}}{256}}} & {{Equation}\mspace{14mu} (1)} \end{matrix}$

A range R₀ and a value V₀ corresponding to the boolean value B₀ are associated with a previous boolean value and may be obtained in advance; a probability P₀ is obtained from a look-up table. A circuit combination 12A performs operations of Equation (1) to provide the split S₀. In practice, the range R₀, the split S₀ and the value V₀ are all integers represented in binary eight bits. The value V₀ of an entire frame is usually placed at first eight bits of a bitstream.

A comparator 12B compares the split S₀ and the value V₀ to determine whether the boolean value B₀ is 1 or 0. The boolean value B₀ is 1 when the split S₀ is smaller than or equals to the value V₀, or else is 0 when the split S₀ is greater than the value V₀.

A range R₁ and a value V₁ corresponding to the next boolean value B₁ are associated with the boolean value B₀, and are generated via a renormalization procedure after the boolean value B₀ is determined. When the boolean value B₀ is 1, an initial value R₁₍₀₎ of R₁ is R₀ subtracted by S₀ and an initial value V₁₍₀₎ of V₁ is V₀ subtracted by S₀. When the boolean value B₀ is 0, the initial value R₁₍₀₎ of R₁ equals S₀ and the initial value V₁₍₀₎ of V₁ equals V₀. As shown in FIG. 1, a subtractor 12C is for generating a difference between the range R₀ and the split S₀. The boolean value B₀ is provided to a multiplexer 12D for determining whether the initial value R₁₍₀₎ provided to a renormalizing unit 12E is the split S₀ or the difference between the range R₀ and the split S₀. Similarly, the boolean value B₀ is also provided to a multiplexer 12F for controlling whether the initial value V₁₍₀₎ provided to a renormalizing unit 12E is the value V₀ or the difference between the value V₀ and the split S₀.

The renormalizing unit 12E then selectively adjusts and confirms the range R₁ and the value V₁. The approach for the adjustment is represented below as:

while (R ₁<128){R ₁ =R ₁*2; V ₁=[(V ₁*2)+nbit(1)]}  Equation (2)

That is to say, R₁ is multiplied by 2 when a current R₁ is smaller than 128 until R₁ becomes greater than or equal to 128. Each time the range R₁ is increased, the value V₁ is also correspondingly multiplied by 2 and then added with a first bit of an unused part in the bitstream. Taking R₁ becoming greater than 128 after it is multiplied by two for three times as an example, the renormalizing unit 12E fetches first three bits in an unused part in the bitstream to generate the value V₁. As shown in FIG. 1, a value N₁ represents a number of bits that the renormalizing unit 12E needs to fetch from an unused part of the bitstream to generate the value V₁; a value N₂ represents a number of bits that a renormalizing unit 14E needs to fetch from an unused part of the bitstream to generate the value V₂. A buffer 18 in FIG. 1 temporarily stores an unused segment of the bitstream, which is to be utilized by the renormalizing units 12E and 14E to generate the value V₁. That is, when the renormalizing units 12E and 14E respectively generate the values V₁ and V₂, it is necessary that the buffer 18 be provided with predetermined bits required by operations of the renormalizing units 12E and 14E.

After having confirmed the range R₁ and the value V₁, a combinational circuit 14A calculates the split S₁ according to the range R₁, a probability P₁ (may be obtained through a look-up table) and Equation (1). By comparing the split S₁ and the value V₁ generated by the renormalizing unit 12E, a comparator 14B determines whether the boolean value B₁ is 1 or 0.

Likewise, a range R₂ and a value V₂ corresponding to the next boolean value B₂ are associated with the boolean value B₁, and are generated via a renormalization procedure after the boolean value B₁ is determined. As shown FIG. 1, a subtractor 14C is for generating a difference between the range R₁ and the split S₁. The boolean value B₁ is provided to the multiplexer 14D, and is utilized for determining whether an initial value R₂₍₀₎ of R₂ provided to the renormalizing unit 14E is the split S₁ or the difference between the range R₁ and the split S₁. The boolean value B₁ is also provided to the multiplexer 14E, and is utilized for determining whether an initial value V₂₍₀₎ of V₂ provided to the renormalizing unit 14E equals to the value V₁ or the difference between the value V₁ and the split S₁. The renormalizing unit 14E then determines the range R₂ and the value V₂ of the next boolean value B₂.

In practice, the circuits 12A to 12E may be utilized to generate the boolean value B₂ and the circuits 14A to 14E may be utilized to generate a subsequent boolean value B₃—the cycle is repetitively performed to sequentially generate a series of boolean values.

As shown in FIG. 1, an updating unit 16 respectively receives the value N₁ from the renormalizing unit 12E and the value N₂ from the renormalizing unit 14E. The value N₁ represents the number of bits that the renormalizing unit 12E needs to fetch from an unused part of the bitstream to generate the value V₂. The value N₂ represents the number of bits that a renormalizing unit 14E needs to fetch from an unused part of the bitstream to generate the value V₂. According to the values N₁ and N₂, the updating unit 16 calculates the total number of bits used in the current cycle to update a content of the buffer 18.

FIG. 2 shows an example of a content of the buffer 18. Assume that the buffer 18 has a storage capacity of 16 bits and stores bits [20:35] (i.e. from the 20^(th) bit to the 35^(th) bit) of the bitstream during a first period T1. For example, when a sum of the values N₁ and N₂ is 8, it means that the first 8 bits [20:27] among the bits [20:35] have been used by the renormalizing units 12E and 14E during the cycle T1. Therefore, the updating unit 16 demands a memory (not shown) of the bitstream and fetches the subsequent 8 bits [36:43] in the bitstream, and updates the content of the buffer 18 to the bits [28:43] before a second cycle T2 starts. That is, the first 8 bits that have already been used are deleted, and the 16 bits that are not yet used are updated into the content of the buffer 18, so as to offer the updated content to the renormalizing units 12E and 14E to generate values V₃ and V₄ in the second cycle T2. Similarly, the updating unit 16 updates the buffer 18 before a next cycle T3 starts according to the number (the total of the values N₃ and N₄) of bits that are used in the generation of the values V₃ and V₄.

Each time in the renormalization procedure, upmost 7 bits are fetched from the bitstream to generate one value V. The capacity of the buffer 18 is generally designed to be sufficient for generating the values V corresponding to two boolean values in a single operating cycle. Referring to FIG. 2, the Boolean entropy decoder 100 generates two boolean values in each cycle, and the content of the buffer 18 varies or remains unchanged along with different numbers of bits consumed in the cycles.

With respect to the structure in FIG. 1, the value N₁ must be generated before the value N₂, and the updating unit 18 can only determine the number of bits to be fetched to update the content of the buffer 18 after the renormalizing unit 14E generates the value N₂. Taking FIG. 2 as an example, the renormalizing unit 14E generates the value N₂ at a time point t_(A1), and the updating unit 16 fetches needed bits from the bitstream for updating the buffer 18 during the remaining time period from the time point t_(A1) to the end of the cycle T1. That is to say, only after the content of the buffer 18 is completely updated, does the next cycle T2 begin. Therefore, it is observed that the time spent for fetching data and updating the buffer prolongs the cycles of the Boolean entropy decoder 100, such that a corresponding operating frequency is lowered to even lead to a failure of the Boolean entropy decoder 100 in meeting requirements of certain high definition video systems.

SUMMARY OF THE INVENTION

In the view of the above issues, the invention is directed to a novel Boolean entropy decoder that shortens cycles by changing a time point of data fetching. In addition, by simultaneously calculating various possible results with several circuits, time needed for decoding may be further reduced.

According to an embodiment of the present invention, a Boolean entropy decoder for converting a bitstream to a plurality of boolean values is provided. The decoder comprises a decoding module, a buffer and an updating module. The decoder sequentially generates a first boolean value, a second boolean value and a third boolean value according to the bitstream. The first boolean value and the second boolean value are generated during a same cycle. The decoding module requires a first bit amount while generating a first value corresponding to the first boolean value, and requires a second bit amount while generating a second value corresponding to the second boolean value. The buffer temporarily stores a bit segment of the bitstream to be provided to the decoding module. The bit segment covers at least the first bit amount and the second bit amount. The updating module fetches a new bit segment according the first bit amount and the second bit amount to update the buffer. The decoding module selectively adjusts a value corresponding to the third boolean value after the buffer is updated.

According to another embodiment of the present invention, a Boolean entropy decoding method applied to a video display system is provided. The Boolean entropy decoding method converts a bitstream to a plurality of boolean values corresponding to image data. The video display system comprises a buffer for temporarily storing a bit segment of the bitstream. The method comprises: generating a value corresponding to a first boolean value by utilizing a first segment having a first bit amount in the bit segment; generating the first boolean value during a first cycle; generating a value corresponding to a second boolean value by utilizing a second segment having a second bit amount in the bit segment; fetching the new bit segment from the bitstream according the first bit amount and the second bit amount, and updating the buffer according to the new bit segment; generating the second boolean value and a value corresponding to a third boolean value also during the first cycle; selectively adjusting the value corresponding to the third boolean value after the buffer is updated; and generating the third boolean value during a second cycle.

The above and other aspects of the invention will become better understood with regard to the following detailed description of the preferred but non-limiting embodiments. The following description is made with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a stereotypic Boolean entropy decoder.

FIG. 2 is an example of a content of a buffer of a conventional Boolean entropy decoder.

FIG. 3 is a circuit block diagram of a Boolean entropy decoder for converting a bitstream to a plurality of boolean values according to an embodiment of the present invention.

FIGS. 4 and 5 are examples of a content of a buffer according to an embodiment of the present invention.

FIGS. 6, 7, 8 and 9 are respectively a partial circuit block diagram of a decoding module according to an embodiment of the present invention.

FIG. 10 is a flowchart of a Boolean entropy decoding method according to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 3 shows a block diagram of a Boolean entropy decoder for converting a bitstream to a plurality of boolean values according to an embodiment of the present invention. A Boolean entropy decoder 200 comprises a decoding module 20, an updating module 26 and a buffer 28. In practice, the Boolean entropy decoder 200 may be integrated in various multimedia systems adopting Boolean encoding, e.g., a VP8-compliant video processing system.

For example, the decoding module 20 may be designed to comprise the circuits 12A to 12E and the circuits 14A to 14E. According to a bitstream input to the Boolean entropy decoder 200, the decoding module 20 sequentially generates a first boolean value B₁, a second boolean value B₂ and a third boolean value B₃. It should be noted that, in this embodiment, the first boolean value B₁ and the second boolean value B₂ are generated during a same cycle, whereas the third boolean value B₃ is generated during a next cycle. Taking the boolean values B₁ to B₃ shown in FIG. 4 as an example, the first boolean value B₁ may be generated by the circuits 12A to 12E during the first half of a first period T1, the second boolean value B₂ may be generated by the circuits 14A to 14E during the second half of the first period T1, the third boolean value B₃ may be generated by the circuits 12A to 12E during the first half of a second period T2, and so forth.

The decoding module 20 requires a first bit amount N₁ while generating a value V₁ corresponding to the first boolean value B₁, and requires a second bit amount N₂ while generating a value V₂ corresponding to the second boolean value B₂. The first bit amount N₁ represents the number of bits in the buffer required when the bitstream is fetched for generating the value V₁ in a renormalization procedure; the second bit amount N₂ represents the number of bits in the buffer required when the bitstream is fetched for generating the value V₂ in the renormalization procedure. The buffer 28 temporarily stores a bit segment of the bitstream to be used by the decoding module 20 for generating the values V. Taking the boolean values B₁, B₂ and B₃ in FIG. 4 as an example, the first bit amount N₁ is determined in the renormalization procedure after a boolean value B₀ is generated during a cycle T0; that is, the decoding module 20 fetches the specific N₁ number of bits from the buffer 28 at a time point t1 The second bit amount N₂ is determined in the renormalization procedure after the boolean value B₁ is generated during the cycle T1; that is, the decoding module 20 fetches the specific N₂ number of bits from the buffer 28 at a time point t2.

After the second bit amount N₂ is determined by the decoding module 20 during the cycle T1, the updating module 26 according to this embodiment fetches a new bit segment from the bitstream according to the second bit amount N₂ as well as the first bit amount N₁ generated during the previous cycle T0. Being distinct from the prior art, while in the prior art, the number of bits to be fetched from the bitstream is calculated according to two bit amounts determined in the same cycle (e.g., the bit amounts N₂ and N₃ in the same cycle T1), the updating module 26 in the present embodiment calculates the number of bits to be fetched from the bitstream according to the bit amounts obtained from two different cycles, i.e., the bit amount determined during the second half of the previous cycle and the bit amount determined during the first half of the next cycle. An example is depicted in FIG. 4, the first bit amount N₁ is generated at the time point t1, and the second bit amount N₂ is generated at the time point t2. After determining the second bit amount N₂ at the time point t2, the updating module 26 in this embodiment determines how a content of the buffer 28 is to be updated according to a sum of N₁ and N₂.

On the other hand, as shown in FIG. 4, the time point at which the buffer 28 is updated in this embodiment is still before each cycle ends (e.g., a time point t3 at which the third bit amount N₃ is generated). By separately performing fetching the required bits and updating the buffer at different time periods to fetch the required bits for subsequently updating the buffer between the time points t2 and t3 in advance, after the time point t3, the updating module 26 only needs to update the content of the buffer 28, and thus saves the time for fetching the required bits. Therefore, cycles of the Boolean entropy decoder 200 may be shortened to equivalently increase an operating frequency of the Boolean entropy decoder 200.

Referring to FIG. 4, assume the decoding module 20 determines that the first bit amount N₁ equals 5 at the time point t1, and determines that the second bit amount N₂ equals 0 at the time point t2. According to the sum of N₁ and N₂, the updating module 26 learns that the first 5 bits out of the bits [28:43] stored in the buffer 28 (i.e., bits segment [28:32] out of [28:43]) have been used by the decoding module 20. Hence, at the time point t2 the updating module 26 requests the memory (not shown) storing the bitstream to fetch the 5 subsequent unused bits started from the end of the bit segment [28:43] (i.e., the bits [44:48]). In practice, the time spent on data fetching is shorter than an interval between the time points t2 and t3, and so the updating module 26 is able to complete the data fetching before the time point t3. At the time point t3, the updating module 26 loads the new bit segment into the buffer 28 to update the content of the buffer 28 to [33:48]. In another embodiment, the updating module 26 may update the content of the buffer 28 immediately after completing the data fetching rather than updating the buffer 28 at the time point t3.

Another example of a content of the buffer 28 is depicted in FIG. 5 according to an embodiment of the present invention. During the cycle T0, suppose that two previous renormalization procedures have used 8 bits [20:27] in the bit segment [20:35] in the buffer 28, the updating module fetches subsequent 8 bits [36:43] started from the end of bit segment [20:35] at a time point t_(A1) in preparation so that the updating module 26 can update the content of the buffer 28 to [28:43] for the next time. As shown in FIG. 5, the updating module 26 updates the content of the buffer 28 at the end of the renormalization procedure after the boolean value B₀ is generated, i.e. the end of the cycle T0. As stated above, the renormalization procedure at the second half of the cycle T0 determines the value V₁ corresponding to the first boolean value B₁. In this example, 7 bits [28:34] in the bit stream are required to generate the value V₁, and therefore the bit amount N₁ equals 7.

At the time point t_(A2), the decoding module 20 finishes the renormalization procedure after the boolean value B₁ is generated. In this example, 7 bits [35:41] in the bit stream are required to generate the value V₂, and therefore the bit amount N₂ equals 7. The updating module 26 instantaneously acquires that a total of 14 bits [28:41] are required to generate the value V₁ and the value V₂, thereby fetches the subsequent 14 bits [44:57], which are not yet loaded to the buffer 28, immediately after a time point t_(A2), and updates the content of the buffer 28 at the end of the cycle T1 to bits [42:57].

Referring to FIG. 5, 7 bits [42:48] of the bitstream are required for generating the value V₃. It should be noted that, although the content of the buffer 28 during the cycle T1 is insufficient for the renormalization procedure for generating the value V₃, the decoding module 20 may not start to update the value V₃ until the content of the buffer 28 is updated to the bits [42:57] (or even after the cycle V2) according to the content (i.e., bits [42:57]) of the buffer 28. More specifically, the decoding module 20 first calculates that R₃₍₀₎ only becomes larger than 128 after multiplying by 2 for seven times in the renormalization procedure during the second half of the cycle T1, and thus obtains that the third bit amount N₃ equals 7. Correspondingly, in the above renormalization procedure, V₃₍₀₎ is also multiplied by 2 for seven times to obtain V₃ to be updated. When the content of the buffer 28 is updated to the bits [42:57], the decoding module 20 fetches the bits [42:48] from the buffer 20 and adds the bits [42:48] to the V₃ to be updated, so as to update the value V₃ to a correct result for generating the boolean value B₃.

It should be noted that, in the event that the content stored in the buffer 28 during the cycle T1 is sufficient for generating the value V₃, the decoding module 20 does not need to adjust the value V₃ after updating the buffer 28. In conclusion, the decoding module 20 selectively adjusts the value V₃ corresponding to the third boolean value B₃ after the buffer 28 is updated. It can be seen from the above examples that the content stored in the buffer 28 during the time period T1 is for the use of the renormalization procedure after the boolean values B_(o) and B₁ are generated. Similarly, the content stored in the buffer 28 during the time period T2 is for the use of the renormalization procedure after the boolean values B₂ and B₃ are generated. Therefore, the bit segment stored in the buffer 28 during the cycle T1 needs only to cover the first bit amount N₁ and the second bit amount N₂. For example, when the first bit amount N₁ and the second bit amount N₂ are respectively upmost 7 bits, a sum of the first bit amount N₁ and the second bit amount N₂ is upmost 14, which is sufficiently covered by a buffer 28 with a capacity of 16 bits.

An example of generating the boolean values B₀ and B₁ during a same cycle T is given to illustrate another embodiment of the decoding module 20. As previously described, the boolean value B₀ may be 1 or 0, and the renormalization procedure after the boolean value B₀ is generated may generate upmost eight results (respectively corresponding to N₁=0˜7). Consequently, there are 16 possibilities as a result of the renormalization procedure after the boolean value B₀ is generated. In the descriptions below, a probability P₁ equals P_(L) when the boolean value B₀ is 0, and P₁ equals P_(M) when the boolean value B₀ is 1.

A situation of the boolean value B₀ being equal to 0 and N₁ being equal to 0 shall be discussed. Under the above conditions, R₁ has the initial value R₁₍₀₎ equal to split S₀ and is greater than or equal to 128. Thus,

$\begin{matrix} {S_{0} = {{1 + \frac{\left( {R_{0} - 1} \right)*P_{0}}{256}} \geq 128}} & {{Equation}\mspace{14mu} \left( {1A} \right)} \end{matrix}$

From Equation (1A):

$\begin{matrix} {\frac{\left( {R_{0} - 1} \right)*P_{0}}{256} > 126} & {{Equation}\mspace{14mu} \left( {1B} \right)} \end{matrix}$

By representing an adjusted split

$\frac{\left( {R_{0} - 1} \right)*P_{0}}{256}$

with a value S₀ _(—) m1, Equation (1B) becomes:

S₀ _(—) m1>126   Equation (1C)

That is, Equation (1C) is established when the boolean value B₀ equals 0 and N₁ equals 0. In other words, when the boolean value B₀ equals 0, Equation (1C) determines the value N₁ according to a value of S₀ _(—) m1.

Furthermore, the initial value V₁₍₀₎ equals V₀, and the renormalization procedure does not need to adjust R₁₍₀₎ and V₁₍₀₎. In other words, R₁ equals R₁₍₀₎ which also equals S₀. Therefore, in the next step of comparing V₁ and S₁ to determine whether the boolean value B₁ is 1 or 0, it is comparing whether V₀ is larger than or equal to

${1 + \frac{\left( {S_{0} - 1} \right)*P_{L}}{256}},$

which is in equivalence comparing whether V₀ is larger than

$\frac{\left( {S_{0} - 1} \right)*P_{L}}{256}.$

Accordingly, an equation for determining whether the boolean value B₁ is 1 or 0 is represented as:

$\begin{matrix} {{V_{0} > {?\frac{\left( {S_{0} - 1} \right)*P_{1}}{256}}} = \frac{\frac{\left( {R_{0} - 1} \right)*P_{0}}{256}*P_{L}}{256}} & {{Equation}\mspace{14mu} \left( {1D} \right)} \end{matrix}$

By representing

$\frac{\left( {R_{0} - 1} \right)*P_{0}}{256}$

by the value S₀ _(—) m1, Equation (1D) is rewritten as:

$\begin{matrix} {V_{0} > {?\frac{S_{0}{\_ m}\; 1*P_{L}}{256}}} & {{Equation}\mspace{14mu} \left( {1E} \right)} \end{matrix}$

It is concluded from Equations (1C) and (1E), by defining the value S₀ _(—) m1, this embodiment is capable of simultaneously simplifying the equations for determining N₁ and the boolean value B₁, so that the boolean value B₁ is generated and the associated parameters are determined by implementing less hardware according to this embodiment. The descriptions below are also given in compliance to the principle of simplifying the equations for determining N₁ and the boolean value B₁. A situation where the boolean value B₀ equals 0 and N₁ equals 1 shall be discussed. Under the above conditions, the initial value R₁₍₀₎ of R₁ equals S₀ and is smaller than or equal to 64. Thus,

$\begin{matrix} {{128 > S_{0}} = {{1 + \frac{\left( {R_{0} - 1} \right)*P_{0}}{256}} \geq 64}} & {{Equation}\mspace{14mu} \left( {2A} \right)} \end{matrix}$

From Equation (2A):

126≧S₀ _(—) m1>62   Equation (2B)

That is, Equation (2B) is established when the boolean value B₀ equals 0 and N₁ equals 1.

Furthermore, the initial value V₁₍₀₎ of V₁ equals V₀, and R₁₍₀₎ and V₁₍₀₎ need to be adjusted in the renormalization procedures. In other words, R₁ equals R₁₍₀₎ multiplied by 2 and also equals S₀ multiplied by 2; V₁ equals V₁₍₀₎ multiplied by 2 plus one unused bit in the bitstream and also equals V₁ multiplied by 2 plus one unused bit in the bitstream. Therefore, in the next step of comparing V₁ and S₁ to determine whether the boolean value B₁ is 1 or 0, it is determining whether the equation below is established:

$\begin{matrix} {\left\{ {V_{0},{{nbit}(1)}} \right\} \geq {1 + \frac{\left( {R_{1} - 1} \right)*P_{L}}{256}}} & {{Equation}\mspace{14mu} \left( {2C} \right)} \end{matrix}$

{V₀, nbit(1)} represents the adjustment described in Equation (2) (multiplied by 2 plus one unused bit in the bitstream) is performed once on V₀.

Equation (2C) can be rewitten as:

$\begin{matrix} {\left\{ {V_{0},{{nbit}(1)}} \right\} > \frac{\left( {{2S_{0}} - 1} \right)*P_{L}}{256}} & {{Equation}\mspace{14mu} \left( {2D} \right)} \end{matrix}$

Therefore, the equation for determining whether the boolean value B₁ is 1 or 0 is represented as:

$\begin{matrix} {\left\{ {V_{0},{{nbit}(1)}} \right\} > {?\frac{\left\lbrack {{\frac{\left( {R_{0} - 1} \right)*P_{0}}{256}*2} + 1} \right\rbrack*P_{L}}{256}}} & {{Equation}\mspace{14mu} \left( {2E} \right)} \end{matrix}$

Equation (2E) may be rewritten as:

$\begin{matrix} {\left\{ {V_{0},{{nbit}(1)}} \right\} > {?\frac{\left\lbrack {{S_{0}{\_ m}\; 1*2} + 1} \right\rbrack*P_{L}}{256}}} & {{Equation}\mspace{14mu} \left( {2F} \right)} \end{matrix}$

Accordingly, it is deduced that when the boolean value B₀ equals 0 and N₁ equals 2, the equation below is established:

62≧S₀ _(—) m1>30   Equation (3A)

The equation for determining whether the boolean value B₁ is 0 or 1 is represented as:

$\begin{matrix} {\left\{ {V_{0},{{nbit}(2)}} \right\} > {?\frac{\left\lbrack {{S_{0}{\_ m}\; 1*4} + 3} \right\rbrack*P_{L}}{256}}} & {{Equation}\mspace{14mu} \left( {3B} \right)} \end{matrix}$

{V₀, nbit(2)} represents the adjustment described in Equation (2) is performed twice on V₀.

When the boolean value B₀ equals 0 and N₁ equals 3, the equation below is established:

30≧S₀ _(—) m1>14   Equation (4A)

The equation for determining whether the boolean value B₁ is 0 or 1 is represented as:

$\begin{matrix} {\left\{ {V_{0},{{nbit}(3)}} \right\} > {?\frac{\left\lbrack {{S_{0}{\_ m}\; 1*8} + 7} \right\rbrack*P_{L}}{256}}} & {{Equation}\mspace{14mu} \left( {4B} \right)} \end{matrix}$

When the boolean value B₀ equals 0 and N₁ equals 4, the equation below is established:

14≧S₀ _(—) m1>6   Equation (5A)

The equation for determining whether the boolean value B₁ is 0 or 1 is represented as:

$\begin{matrix} {\left\{ {V_{0},{{nbit}(4)}} \right\} > {?\frac{\left\lbrack {{S_{0}{\_ m}\; 1*16} + 15} \right\rbrack*P_{L}}{256}}} & {{Equation}\mspace{14mu} \left( {5B} \right)} \end{matrix}$

When the boolean value B₀ equals 0 and N₁ equals 5, the equation below is established:

6≧S₀ _(—) m1>2   Equation (6A)

The equation for determining whether the boolean value B₁ is 0 or 1 is represented as:

$\begin{matrix} {\left\{ {V_{0},{{nbit}(5)}} \right\} > {?\frac{\left\lbrack {{S_{0}{\_ m}\; 1*32} + 31} \right\rbrack*P_{L}}{256}}} & {{Equation}\mspace{14mu} \left( {6B} \right)} \end{matrix}$

When the boolean value B₀ equals 0 and N₁ equals 6, the equation below is established:

2≧S₀ _(—) m1>0   Equation (7A)

The equation for determining whether the boolean value B₁ is 0 or 1 is represented as:

$\begin{matrix} {\left\{ {V_{0},{{nbit}(6)}} \right\} > {?\frac{\left\lbrack {{S_{0}{\_ m}\; 1*64} + 63} \right\rbrack*P_{L}}{256}}} & {{Equation}\mspace{14mu} \left( {7B} \right)} \end{matrix}$

When the boolean value B₀ equals 0 and N₁ equals 7, the equation below is established:

S₀ _(—) m1=0   Equation (8A)

The equation for determining whether the boolean value B₁ is 0 or 1 is represented as:

$\begin{matrix} {\left\{ {V_{0},{{nbit}(7)}} \right\} > {?\frac{\left\lbrack {{S_{0}{\_ m}\; 1*128} + 127} \right\rbrack*P_{L}}{256}}} & {{Equation}\mspace{14mu} \left( {8B} \right)} \end{matrix}$

In conclusion, depending on which of the ranges divided by the 7 numbers of 0, 2, 6, 14, 30, 62 and 126 the value S₀ _(—) m1 falls in, it may be determined N₁ is which of the value between 0 to 7. FIG. 6 shows an example of a circuit for realizing the abovementioned equations. A multiplier 61A and a divider 61B perform preliminary operations to generate S₀ _(—) m1. A determining unit 62 determines N₁ is which of the value from 0 to 7.

A first adjusting unit 63, a second adjusting unit 64 and circuit combinations 65A to 65H respectively generates eight boolean values B₁ corresponding to different values of N₁ according to the above equations for determining the boolean value B₁, and a multiplexer 66 selects a correct boolean value B₁ from the outputs of the circuit combinations 65A to 65H according to N₁ outputted by the determining unit 62. The first adjusting unit 63 respectively calculates seven reference ranges of S₀ _(—) m1*2+1, S₀ _(—) m1*4+3, S₀ _(—) m1*8+7, S₀ _(—) m1*16+15, S₀ _(—) m1*32+31, S₀ _(—) m1*64+63 and S₀ _(—) m1*128+127 according to S₀ _(—) m1 outputted by the divider 61B. The second adjusting unit 64 calculates seven reference values of {V₀, nbit(1)}, {V₀, nbit(2)}, {V₀, nbit(3)}, {V₀, nbit(4)}, {V₀, nbit(5)}, {V₀, nbit(6)} and {V₀, nbit(7)} according to V₀. In practice, instead of requiring the additional hardware of the adder and the multiplier, the first adjusting unit 63 can generate the above seven reference ranges by shifting S₀ _(—) m1 to the left and adding 1 to the least significant bit.

The circuit combination 65A receives V₀ and S₀ _(—) m1 outputted by the divider 61B, and performs the operations of Equation (1E) to generate the corresponding boolean value B₁ when the boolean value B₀ equals 0 and N₁ equals 0. The circuit combination 65B receives S₀ _(—) m1*2+1 outputted by the first adjustment unit 63 and {V₀, nbit(1)} outputted by the second adjustment unit 64, and performs the operations of Equation (2F) to generate the corresponding boolean value B₁ when the boolean value B₀ equals 0 and N₁ equals 1. As shown in FIG. 6, the circuit combinations 65C to 65H respectively generate the boolean value B₁ corresponding to the other six conditions. The multiplexer 66 then selects the correct B₁ from the outputs of the 65A to 65H according to N₁ outputted by the determining unit 62.

Referring to FIG. 6, an input signal received by the multiplier 61 a is (R₀−1) rather than R₀. In practice, operations for (R₀−1) may be combined into the prior renormalization procedure for generating R₀ to eliminate one subtractor.

Referring to FIG. 7, apart from the circuit combination 60 shown in FIG. 6, the decoding module 20 according to an embodiment of the present invention may further comprise multiplexers 67A to 67C, 68A and 68B, and a renormalizing unit 69. According to N₁ generated by the circuit combination 60, the multiplexer 67A selects S₁ corresponding to N₁ from S₁ _(—) ₀₀ to S₁ _(—) ₀₇ shown in FIG. 6. The multiplexer 67B selects V₁ corresponding to N₁ from eight values of V₀, {V₀, nbit(1)} to {V₀, nbit(7)} according to N₁. The multiplexer 67C selects R₁ corresponding to N₁ from eight values of S₀ _(—) m1*2+1 to S₀ _(—) m1*128+127 according to N₁.

According to N₁ generated by the circuit combination 60, the multiplexer 68A selects either S₁ or the difference between S₁ and R₁ as the initial value R₂₍₀₎ of R₂ corresponding to the boolean value B₂. The multiplexer 68B selects either V₁ or the difference between V₁ and S₁ as the initial value V₂₍₀₎ of V₂ corresponding to the boolean value B₂ according to the boolean value B₁. The initial values R₂₍₀₎ and V₂₍₀₎ are provided to the renormalizing unit 69, which next determines R₂, V₂ and N₂ corresponding to the boolean value B₂. According to N₂ outputted by the renormalizing unit 69 and N₁ previously generated by circuit combination 60, the updating module 26 determines how the content of the buffer 28 is to be updated. Details of updating the buffer 28 are described above and omitted herein.

Likewise, the eight situations when the boolean value B₀ equals 1 may also be deduced to another eight sets of equations, and may be realized by the circuit combinations similar to those shown in FIG. 6 and integrated with the circuit in FIG. 7. That is, similarly via the defined value of S₀ _(—) m1, equations for determining N₁ when the boolean value B₀ equals 1 and for determining the boolean value B₁ can be simplified; in this way, the boolean value B₁ can be generated and the associated parameters can be determined with less hardware according to this embodiment. FIG. 8 shows an example of a circuit integrating that covering 16 possibilities. As shown in FIG. 8, a difference between the value (R₀−1) and S₀ _(—) m1 is further defined as S₀ _(—) m2 for simplifying equations for determining N₁ and the boolean value B₁. In this example, according to the values S₀ _(—) m1 and S₀ _(—) m2, the determining unit 62 may determine whether the boolean value 0 is 0 or 1 and N₁ is which of the values from 0 to 7. For example, when the boolean value B₀ equals 1 and N₁ equals 0, it means the initial value R₁₍₀₎ of R₁ equals (R₀−S₀) is greater than or equals to 128. Hence:

R ₀ −S ₀ =R ₀−(1+S ₀ _(—) m1)=(R ₀−1)−S ₀ _(—) m1≧128   Equation (9A)

Equation (9A) may be rewritten as:

S₀ _(—) m2 >127 Equation (9B)

When a relationship between the value S₀ _(—) m1 and R₀ matches Equation (9B), the determining unit 62 then determines that the boolean value B₀ equals 1 and N₁ equals 0.

Furthermore, the initial value V₁₍₀₎ of V₁ equals (V₀−S₀), and the renormalization procedure does not need to adjust R₁₍₀₎ and V₁₍₀₎. In the next step of comparing V₁ and S₁ to determine whether the boolean value B₁ is 1 or 0, it is in equivalence determining whether the equation below is established:

$\begin{matrix} \begin{matrix} {{V_{0} - S_{0}} \geq {?{1 + \frac{\left( {R_{1} - 1} \right)*P_{M}}{256}}}} \\ {= {1 + \frac{\left( {R_{0} - S_{0} - 1} \right)*P_{M}}{256}}} \end{matrix} & {{Equation}\mspace{14mu} \left( {9C} \right)} \end{matrix}$

Equation (9C) may be rewritten as:

$\begin{matrix} {{V_{0} - S_{0}} > {?\frac{S_{0}{\_ m}\; 2*P_{M}}{256}}} & {{Equation}\mspace{14mu} \left( {9D} \right)} \end{matrix}$

Other seven sets of equations for describing correlations when the boolean value B₀ equals 1 and N₁ equals 1 to 7 may be similarly deduced.

Referring to FIG. 8, a third adjusting unit 70 respectively calculates seven values of S₀ _(—) m1*2+1, S₀ _(—) m1*4+3, S₀ _(—) m1*8+7, S₀ _(—) m1*16+15, S₀ _(—) m1*32+31, S₀ _(—) m1*64+63 and S₀ _(—) m1*128+127 according to S₀ _(—) m2. In this example, the multiplexer 66 selects the corresponding boolean value B₁ according to the boolean value B₀ and the value N₁ provided by the determining unit 62. Similarly, S₁, V₁ and R₁ corresponding to the boolean value B₀ and the value N₁ are also selected according to the boolean value B₀ and the value N₁ provided by the determining unit 62, and are provided to a subsequent circuit for generating the boolean value B₂.

FIG. 9 shows an example of a simplified circuit of the circuit in FIG. 8. In this example, it is first determined whether the B₀ is 1 or 0, and the value N₁ is then determined by the determining unit 62. Subsequent adjusting units, multipliers, adders and comparators are shared by two situations when the boolean value B₀ equals 1 or 0. Therefore, the boolean value B₀ is utilized for controlling a plurality of multiplexers for selecting the values inputted to the determining unit 62, the multipliers and the comparators. Operation details of the circuit in FIG. 9 may be appreciated with reference to the descriptions of foregoing examples and are therefore omitted herein.

It is seen from the above example that, according to possible results generated by a decoding process, the decoding module 20 may be decomposed into a plurality of sets of circuits, which simultaneously calculate output results corresponding to various possibilities. Taking the circuit in FIG. 8 as an example, the boolean value B₁ may be generated before V₁ and R1 being determined, such as being determined by the renormalizing unit 12E in FIG. 1 ng. Therefore, the cycle T of the Boolean entropy decoder 200 may be further shortened to increase the operating frequency of the Boolean entropy decoder 200. It should be noted that, as shown in FIG. 8, since components for performing the operations of the decomposed circuit are generally multipliers, dividers and comparators, a corresponding circuit structure is simpler than circuits having additional adders and subtractors, so as to reduce a chip area.

FIG. 10 shows a flowchart of a Boolean entropy decoding method applied to a video display system provided according to another embodiment of the present invention. The video display system comprises a buffer for temporarily storing a bit segment of a bitstream. Step S11 comprises generating a value V₁ corresponding to a first boolean value B₁ by utilizing a first segment having a first bit amount N₁ in the bit segment. Taking the situation in FIG. 4 as an example, the first bit amount N₁ is generated in the second half of the renormalization procedure during the cycle T0. Step S12 comprises generating the first boolean value B₁ during a first cycle. Step S13 comprises generating a value V₂ corresponding to a second boolean value B₂ by utilizing a second segment having a second bit amount N₂ in the bit segment. Taking the situation in FIG. 4 as an example, the second bit amount N₂ is generated in the first half of the renormalization procedure during the cycle T1. Step S14 comprises fetching a new bit segment from the bitstream according to the first bit amount N₁ and the second bit amount N₂. Step S15, which may be performed simultaneously with Step S14, comprises generating the second boolean value B₂ during the first cycle.

Step S16 comprises generating a value V₃ corresponding to a third boolean value B₃. Step S17 comprises selectively adjusting the value V₃ after the buffer is updated according to the new bit segment. Taking the situation in FIG. 4 as an example, the value V₃ is generated in the second half of the renormalization procedure during the cycle T1, and the buffer is updated before the cycle T2 starts or ends. After the buffer is updated, the value V₃ is selectively adjusted according to the number of bits required by the value V₃. Step S18 comprises generating the third boolean value B₃ during the cycle T2 by utilizing the selectively updated value V₃.

The process shown in FIG. 10 may be implemented to various Boolean entropy decoders rather than being limited to the circuit structure shown in FIG. 1 or FIG. 6.

While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures. 

What is claimed is:
 1. A Boolean entropy decoder, for decoding a bitstream, comprising: a decoding module, for generating an initial boolean value, a first boolean value and a second boolean value according to the bitstream, requiring a first bit amount while generating a first value corresponding to the first boolean value, and requiring a second bit amount while generating a second value corresponding to the second boolean value; wherein, the first boolean value, the second value, the second boolean value and a temporary third value corresponding to a third boolean value are generated during a same cycle; a buffer, for temporarily storing a bit segment of the bitstream to be provided to the decoding module, the bit segment covering the first bit amount and the second bit amount; and an updating module, updating the buffer after fetching a new bit segment from the bitstream according to the first bit amount and the second bit amount; wherein, the decoding module selectively adjusts the temporary third value corresponding to the third boolean value after the buffer is updated.
 2. The Boolean entropy decoder according to claim 1, wherein the first bit amount and the second bit amount respectively have a maximum value of 7 bits, and the buffer has a capacity of 16 bits.
 3. The Boolean entropy decoder according to claim 1, the first bit amount being in the range of 0 to N−1, N being a positive integer, the decoding module comprising: a preliminary computing unit, for generating an adjusted split according to a range and a probability corresponding to the initial boolean value; a determining unit, for determining the first bit amount according to the adjusted split; a first adjusting unit, for generating (N−1) reference ranges according to the adjusted split; a second adjusting unit, for generating (N−1) reference values according to an initial value corresponding to the initial boolean value; N sets of calculating circuits, for generating N candidate boolean values according to the adjusted split, the initial value corresponding to the initial boolean value, the (N−1) reference ranges and the (N−1) reference values; and a first multiplexer, for selecting the second boolean value from the N candidate boolean values according to the first bit amount.
 4. The Boolean entropy decoder according to claim 3, wherein the N sets of calculating circuits respectively generates a reference split, and the decoding module further comprises: a second multiplexer, for selecting a split corresponding to the first boolean value from the N reference splits according to the first bit amount; a third multiplexer, for selecting the first value corresponding to the first boolean value from the initial value corresponding to the initial boolean value and the (N−1) reference values according to the first bit amount; and a fourth multiplexer, for selecting a range corresponding to the first boolean value from the adjusted split and the (N−1) reference ranges according to the first bit amount.
 5. The Boolean entropy decoder according to claim 3, wherein N equals
 8. 6. The Boolean entropy decoder according to claim 3, wherein the first adjusting unit generates the reference ranges by utilizing at least one shifter.
 7. A Boolean entropy decoding method applied to a video display system, for decoding a bitstream, the video display system comprising a buffer for temporarily storing a bit segment of the bitstream, the method comprising: generating a first value corresponding to a first boolean value by utilizing a first segment having a first bit amount in the bit segment; generating the first boolean value during a first cycle; generating a second value corresponding to a second boolean value by utilizing a second segment having a second bit amount in the bit segment; fetching a new bit segment from the bitstream according to the first bit amount and the second bit amount; generating the second boolean value during the first cycle; generating a temporary third value corresponding to a third boolean value, and selectively updating the third temporary third boolean value after the buffer is updated according to the new bit segment; and generating the third boolean value by utilizing the selectively adjusted temporary third value during a second cycle.
 8. The method according to claim 7, wherein the first bit amount and the second bit amount respectively have a maximum value of 7 bits, and the buffer has a capacity of 16 bits.
 9. The method according to claim 7, wherein the buffer is updated after the new bit segment is fetched from the bitstream or before the second cycle starts.
 10. The method according to claim 7, wherein the first boolean value, the second value and the second boolean value are generated during the first cycle. 